package com.service;

import com.entity.Resource;
import com.entity.User;
import com.exception.ServiceException;
import com.github.pagehelper.PageInfo;
import com.util.AjaxResult;
import com.vo.ResourceVo;

public interface ResourceService {
     AjaxResult checkResourceByIdAndUser(Integer resourceId, User user);

     Resource findResourceByResourceId(Integer resourceId);

     //luo
     PageInfo<ResourceVo> findBackResource(Integer page, ResourceVo resourceVo);
     void toggleStatus(Resource resource);
     Resource down(Integer id);

     //xu
     Boolean addResource(Resource resource) throws ServiceException;
     Resource findPathById(int id)throws ServiceException;
     int findClickCountById(int id)throws  ServiceException;
     Boolean changeClickCountById(int id,int click_count) throws  ServiceException;
     int existsTitlt(String title)throws ServiceException;
     PageInfo<ResourceVo> findBackResource(int pageNo,int userId);
     void modifyFrontResource(Resource resource);//修改资源
     AjaxResult removeFrontResource(int id);
     PageInfo findResourceByPageNo(ResourceVo resourceVo, Integer pageNo);
     void changeResourceStatusById(int id,int status);
}
